home *** CD-ROM | disk | FTP | other *** search
- on mouseUp
- writeToFile()
- beep()
- go("begin")
- end
-
- on writeToFile
- global myFile, theLocation, finalPath
- if objectp(myFile) then
- set myFile to 0
- end if
- set myFile to new(xtra("fileio"))
- setFilterMask(myFile, "ALL FILES, *.*, TEXT FILES, *.TXT")
- set theLocation to displayOpen(myFile)
- if not voidp(theLocation) then
- checkFile()
- else
- alert("You did not select your Web Browser.")
- end if
- closeFile(myFile)
- set myFile to 0
- end
-
- on checkFile
- global myFile, theLocation, finalPath
- put theLocation
- set finalPath to field "OSPath"
- openFile(myFile, finalPath & "BROWSER.TXT", 0)
- if status(myFile) = 0 then
- delete(myFile)
- closeFile(myFile)
- end if
- put theLocation into field "BrowserSelect"
- set finalPath to field "OSPath"
- createFile(myFile, finalPath & "BROWSER.TXT")
- openFile(myFile, finalPath & "BROWSER.TXT", 0)
- writeString(myFile, theLocation)
- end
-